Objective:
To analyze lysosomes, cellular organelles, focusing on cathepsins and
lipofuscins, to understand cellular changes associated with specific
pathologies, particularly Alzheimer’s disease (APP vs. CTRL).
Methodology:
Analysis of Cell Files:
Hypothesis:
Study Limitations:
Statistical Methods Used: We applied mixed-effects linear models to analyze the data, taking into account several variables of interest for each of the six groups.
Equations associated with these models:
Area of each cathepsin: \[ Y_{ijk} = \beta_{0} + \beta_{\text{group(i)}} + u_{\text{cell (ij)}} + v_{\text{subjet (i)}} + \varepsilon_{ijk} \]
Cell outline: \[ Y_{ij} = \beta_{0} + \beta_{\text{group (i)}} + u_{\text{subjet (i)}} + \varepsilon_{ij} \]
Number of points per cell size: \[ Y_{ij} = \beta_{0} + \beta_{\text{group (i)}} + u_{\text{subjet (i)}} + \varepsilon_{ij} \]
Where:
The first ten lines of the database to have an overview of the data we will analyze.
data <- openxlsx::read.xlsx("/home/baptiste.criniere/Documents/PB_AD_AK/Data/icy_size3.xlsx", sheet = 1)
data <- data %>%
dplyr::select(brain_id, disease_grp, image_id, cell_id, modality, area_um2, nb_poncta_area_um2_weighted) %>%
dplyr::mutate(brain_id = brain_id %>% factor) %>%
dplyr::mutate(disease_grp = disease_grp %>% factor) %>%
dplyr::mutate(image_id = image_id %>% factor) %>%
dplyr::mutate(cell_id = cell_id %>% factor) %>%
dplyr::mutate(modality = modality %>% factor) %>%
dplyr::rename(nb_poncta_area = nb_poncta_area_um2_weighted) %>%
dplyr::rename(area = area_um2)
demo <- openxlsx::read.xlsx("/home/baptiste.criniere/Documents/PB_AD_AK/Data/Demographics_11-2021_Amal_modified.xlsx", sheet = 3, startRow = 2)
demo <- demo %>%
dplyr::select(EXCEL, BRAINBANK) %>%
dplyr::rename(brain_id = EXCEL)
data <- data %>%
dplyr::left_join(demo)
head(data, n = 10) %>%
DT::datatable() %>%
DT::formatRound(columns=c('area', 'nb_poncta_area'), digits=3)
Here is an interactive figure where each point corresponds to the averaged area for a cell from the same subject
fig <- data %>%
dplyr::filter(modality %in% "contour") %>%
dplyr::group_by(brain_id, disease_grp) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
ggplot(aes(x = disease_grp, y = Area))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
theme_classic()+
theme(legend.position = "none")+
labs(x = "")
ggplotly(fig)
As observed in this figure, each center contains only one pathology. Therefore, disregarding the centers in our analysis could introduce bias. If we measure the effect of the disease on the area, we might actually be observing the effect of the center. In the following section, we will conduct an analysis on the controls to see if there is a center effect.
data %>%
dplyr::filter(modality %in% "contour") %>%
dplyr::group_by(brain_id, disease_grp, BRAINBANK) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
dplyr::filter(!is.na(BRAINBANK)) %>%
ggplot(aes(x = disease_grp, y = Area, color = disease_grp))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
facet_wrap(~BRAINBANK)+
theme_classic()+
theme(legend.position = "none")+
scale_color_aaas()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
labs(x = "")
data %>%
dplyr::filter(modality %in% "all CATHB") %>%
dplyr::filter(area < 1) %>%
dplyr::arrange(disease_grp, brain_id) %>%
ggplot(aes(x = reorder(brain_id, as.numeric(disease_grp), na.rm = TRUE), y = area, color = disease_grp))+
geom_boxplot(outlier.shape = NA)+
geom_jitter(alpha = 0.075, size = 0.1)+
theme_classic()+
labs(x = "", color = "Disease")+
scale_color_nejm()+
scale_y_continuous(expand = c(0.001,0.01))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),
legend.position = "bottom")+
guides(color = guide_legend(nrow = 1))
Here is an interactive figure where each point corresponds to the averaged area for a cell from the same subject
fig <- data %>%
dplyr::filter(modality %in% "all CATHB") %>%
dplyr::group_by(brain_id, disease_grp) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
ggplot(aes(x = disease_grp, y = Area))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
theme_classic()+
theme(legend.position = "none")+
labs(x = "")
ggplotly(fig)
As observed in this figure, each center contains only one pathology. Therefore, disregarding the centers in our analysis could introduce bias. If we measure the effect of the disease on the area, we might actually be observing the effect of the center. In the following section, we will conduct an analysis on the controls to see if there is a center effect.
data %>%
dplyr::filter(modality %in% "all CATHB") %>%
dplyr::group_by(brain_id, disease_grp, BRAINBANK) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
dplyr::filter(!is.na(BRAINBANK)) %>%
ggplot(aes(x = disease_grp, y = Area, color = disease_grp))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
facet_wrap(~BRAINBANK)+
theme_classic()+
theme(legend.position = "none")+
scale_color_aaas()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
labs(x = "")
data %>%
dplyr::filter(modality %in% "LF") %>%
dplyr::filter(area < 1) %>%
dplyr::arrange(disease_grp, brain_id) %>%
ggplot(aes(x = reorder(brain_id, as.numeric(disease_grp), na.rm = TRUE), y = area, color = disease_grp))+
geom_boxplot(outlier.shape = NA)+
geom_jitter(alpha = 0.075, size = 0.1)+
theme_classic()+
labs(x = "", color = "Disease")+
scale_color_nejm()+
scale_y_continuous(expand = c(0.001,0.01))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),
legend.position = "bottom")+
guides(color = guide_legend(nrow = 1))
Here is an interactive figure where each point corresponds to the averaged area for a cell from the same subject
fig <- data %>%
dplyr::filter(modality %in% "LF") %>%
dplyr::group_by(brain_id, disease_grp) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
ggplot(aes(x = disease_grp, y = Area))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
theme_classic()+
theme(legend.position = "none")+
labs(x = "")
ggplotly(fig)
As observed in this figure, each center contains only one pathology. Therefore, disregarding the centers in our analysis could introduce bias. If we measure the effect of the disease on the area, we might actually be observing the effect of the center. In the following section, we will conduct an analysis on the controls to see if there is a center effect.
data %>%
dplyr::filter(modality %in% "LF") %>%
dplyr::group_by(brain_id, disease_grp, BRAINBANK) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
dplyr::filter(!is.na(BRAINBANK)) %>%
ggplot(aes(x = disease_grp, y = Area, color = disease_grp))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
facet_wrap(~BRAINBANK)+
theme_classic()+
theme(legend.position = "none")+
scale_color_aaas()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
labs(x = "")
data %>%
dplyr::filter(modality %in% "excl CATHB") %>%
dplyr::filter(area < 1) %>%
dplyr::arrange(disease_grp, brain_id) %>%
ggplot(aes(x = reorder(brain_id, as.numeric(disease_grp), na.rm = TRUE), y = area, color = disease_grp))+
geom_boxplot(outlier.shape = NA)+
geom_jitter(alpha = 0.075, size = 0.1)+
theme_classic()+
labs(x = "", color = "Disease")+
scale_color_nejm()+
scale_y_continuous(expand = c(0.001,0.01))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),
legend.position = "bottom")+
guides(color = guide_legend(nrow = 1))
Here is an interactive figure where each point corresponds to the averaged area for a cell from the same subject
fig <- data %>%
dplyr::filter(modality %in% "excl CATHB") %>%
dplyr::group_by(brain_id, disease_grp) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
ggplot(aes(x = disease_grp, y = Area))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
theme_classic()+
theme(legend.position = "none")+
labs(x = "")
ggplotly(fig)
As observed in this figure, each center contains only one pathology. Therefore, disregarding the centers in our analysis could introduce bias. If we measure the effect of the disease on the area, we might actually be observing the effect of the center. In the following section, we will conduct an analysis on the controls to see if there is a center effect.
data %>%
dplyr::filter(modality %in% "excl CATHB") %>%
dplyr::group_by(brain_id, disease_grp, BRAINBANK) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
dplyr::filter(!is.na(BRAINBANK)) %>%
ggplot(aes(x = disease_grp, y = Area, color = disease_grp))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
facet_wrap(~BRAINBANK)+
theme_classic()+
theme(legend.position = "none")+
scale_color_aaas()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
labs(x = "")
data %>%
dplyr::filter(modality %in% "minus LF") %>%
dplyr::filter(area < 1) %>%
dplyr::arrange(disease_grp, brain_id) %>%
ggplot(aes(x = reorder(brain_id, as.numeric(disease_grp), na.rm = TRUE), y = area, color = disease_grp))+
geom_boxplot(outlier.shape = NA)+
geom_jitter(alpha = 0.075, size = 0.1)+
theme_classic()+
labs(x = "", color = "Disease")+
scale_color_nejm()+
scale_y_continuous(expand = c(0.001,0.01))+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),
legend.position = "bottom")+
guides(color = guide_legend(nrow = 1))
Here is an interactive figure where each point corresponds to the averaged area for a cell from the same subject
fig <- data %>%
dplyr::filter(modality %in% "minus LF") %>%
dplyr::group_by(brain_id, disease_grp) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
ggplot(aes(x = disease_grp, y = Area))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
theme_classic()+
theme(legend.position = "none")+
labs(x = "")
ggplotly(fig)
As observed in this figure, each center contains only one pathology. Therefore, disregarding the centers in our analysis could introduce bias. If we measure the effect of the disease on the area, we might actually be observing the effect of the center. In the following section, we will conduct an analysis on the controls to see if there is a center effect.
data %>%
dplyr::filter(modality %in% "minus LF") %>%
dplyr::group_by(brain_id, disease_grp, BRAINBANK) %>%
dplyr::summarise(Area = mean(area, na.rm = TRUE)) %>%
dplyr::filter(!is.na(BRAINBANK)) %>%
ggplot(aes(x = disease_grp, y = Area, color = disease_grp))+
geom_boxplot(outlier.shape = NA, alpha = 0.5)+
geom_jitter(alpha = 0.5, size = 2)+
facet_wrap(~BRAINBANK)+
theme_classic()+
theme(legend.position = "none")+
scale_color_aaas()+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
labs(x = "")
No center effect is observed on the controls, and we assume that this conclusion may extend to the other groups. Therefore, we proceed with the rest of the analysis without considering a center effect
data2 <- data %>%
dplyr::filter(disease_grp %in% "CTRL" & modality %in% "contour")
model <- lmerTest::lmer(area ~ BRAINBANK + (1|brain_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## BRAINBANK 8.5577 2 0.01386 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
data2 <- data %>%
dplyr::filter(modality %in% "contour")
model <- lmerTest::lmer(area ~ disease_grp + (1|brain_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## disease_grp 10.724 5 0.05714 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emm <- emmeans::emmeans(model, pairwise ~ "disease_grp")
emm1 <- emm$emmeans
emm1 <- data.frame(emm1) %>%
dplyr::select(disease_grp, emmean, SE)
emm$contrasts
## contrast estimate SE df t.ratio p.value
## APP - CTRL -12.11 21.8 49.0 -0.556 0.9933
## APP - DS -73.06 31.5 48.9 -2.323 0.2048
## APP - DSD -31.75 27.3 48.0 -1.161 0.8528
## APP - DUPAPP -34.42 26.2 48.6 -1.315 0.7755
## APP - SAD 13.63 22.8 48.5 0.599 0.9906
## CTRL - DS -60.95 29.8 48.3 -2.046 0.3324
## CTRL - DSD -19.64 25.4 47.1 -0.773 0.9708
## CTRL - DUPAPP -22.31 24.2 47.7 -0.924 0.9384
## CTRL - SAD 25.74 20.4 47.2 1.262 0.8035
## DS - DSD 41.31 34.1 47.9 1.212 0.8289
## DS - DUPAPP 38.64 33.2 48.2 1.166 0.8508
## DS - SAD 86.69 30.5 48.1 2.840 0.0680
## DSD - DUPAPP -2.67 29.3 47.2 -0.091 1.0000
## DSD - SAD 45.39 26.3 46.9 1.728 0.5211
## DUPAPP - SAD 48.05 25.1 47.4 1.918 0.4042
##
## Degrees-of-freedom method: kenward-roger
## P value adjustment: tukey method for comparing a family of 6 estimates
emm1 %>%
ggplot(aes(x = disease_grp, y = emmean))+
geom_bar(stat = "identity", color="black", width = 0.85, alpha = 0.75)+
geom_errorbar(aes(ymin = emmean - SE, ymax = emmean + SE), width=.2,
position=position_dodge(.9))+
theme_classic()+
labs(x = "", y = "Estimated mean")
No center effect is observed on the controls, and we assume that this conclusion may extend to the other groups. Therefore, we proceed with the rest of the analysis without considering a center effect
data2 <- data %>%
dplyr::filter(disease_grp %in% "CTRL" & modality %in% "all CATHB")
model <- lmerTest::lmer(area ~ BRAINBANK + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## BRAINBANK 0.6284 2 0.7304
data2 <- data %>%
dplyr::filter(modality %in% "all CATHB")
model <- lmerTest::lmer(area ~ disease_grp + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## disease_grp 10.776 5 0.056 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emm <- emmeans::emmeans(model, pairwise ~ "disease_grp")
emm1 <- emm$emmeans
emm1 <- data.frame(emm1) %>%
dplyr::select(disease_grp, emmean, SE)
emm$contrasts
## contrast estimate SE df z.ratio p.value
## APP - CTRL -0.021627 0.01019 Inf -2.123 0.2754
## APP - DS -0.000241 0.01469 Inf -0.016 1.0000
## APP - DSD 0.007607 0.01286 Inf 0.591 0.9916
## APP - DUPAPP 0.000404 0.01226 Inf 0.033 1.0000
## APP - SAD -0.016937 0.01068 Inf -1.586 0.6078
## CTRL - DS 0.021386 0.01384 Inf 1.545 0.6348
## CTRL - DSD 0.029234 0.01189 Inf 2.459 0.1364
## CTRL - DUPAPP 0.022031 0.01123 Inf 1.961 0.3648
## CTRL - SAD 0.004690 0.00948 Inf 0.495 0.9964
## DS - DSD 0.007848 0.01591 Inf 0.493 0.9964
## DS - DUPAPP 0.000645 0.01543 Inf 0.042 1.0000
## DS - SAD -0.016696 0.01420 Inf -1.175 0.8487
## DSD - DUPAPP -0.007203 0.01371 Inf -0.526 0.9952
## DSD - SAD -0.024544 0.01231 Inf -1.994 0.3457
## DUPAPP - SAD -0.017341 0.01168 Inf -1.485 0.6742
##
## Degrees-of-freedom method: asymptotic
## P value adjustment: tukey method for comparing a family of 6 estimates
emm1 %>%
ggplot(aes(x = disease_grp, y = emmean))+
geom_bar(stat = "identity", color="black", width = 0.85, alpha = 0.75)+
geom_errorbar(aes(ymin = emmean - SE, ymax = emmean + SE), width=.2,
position=position_dodge(.9))+
theme_classic()+
ylim(c(0,0.2))+
labs(x = "", y = "Estimated mean")
No center effect is observed on the controls, and we assume that this conclusion may extend to the other groups. Therefore, we proceed with the rest of the analysis without considering a center effect
data2 <- data %>%
dplyr::filter(disease_grp %in% "CTRL" & modality %in% "LF")
model <- lmerTest::lmer(area ~ BRAINBANK + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## BRAINBANK 5.0367 2 0.08059 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
data2 <- data %>%
dplyr::filter(modality %in% "LF")
model <- lmerTest::lmer(area ~ disease_grp + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## disease_grp 16.765 5 0.004968 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emm <- emmeans::emmeans(model, pairwise ~ "disease_grp")
emm1 <- emm$emmeans
emm1 <- data.frame(emm1) %>%
dplyr::select(disease_grp, emmean, SE)
emm$contrasts
## contrast estimate SE df z.ratio p.value
## APP - CTRL 0.00701 0.0293 Inf 0.239 0.9999
## APP - DS 0.08636 0.0421 Inf 2.050 0.3139
## APP - DSD 0.11849 0.0369 Inf 3.211 0.0166
## APP - DUPAPP 0.07153 0.0352 Inf 2.030 0.3249
## APP - SAD 0.03379 0.0307 Inf 1.101 0.8812
## CTRL - DS 0.07935 0.0399 Inf 1.987 0.3495
## CTRL - DSD 0.11148 0.0344 Inf 3.244 0.0150
## CTRL - DUPAPP 0.06452 0.0326 Inf 1.981 0.3533
## CTRL - SAD 0.02678 0.0276 Inf 0.970 0.9274
## DS - DSD 0.03213 0.0458 Inf 0.702 0.9818
## DS - DUPAPP -0.01484 0.0444 Inf -0.334 0.9995
## DS - SAD -0.05257 0.0410 Inf -1.284 0.7942
## DSD - DUPAPP -0.04696 0.0395 Inf -1.188 0.8428
## DSD - SAD -0.08470 0.0356 Inf -2.382 0.1624
## DUPAPP - SAD -0.03774 0.0338 Inf -1.116 0.8751
##
## Degrees-of-freedom method: asymptotic
## P value adjustment: tukey method for comparing a family of 6 estimates
emm1 %>%
ggplot(aes(x = disease_grp, y = emmean))+
geom_bar(stat = "identity", color="black", width = 0.85, alpha = 0.75)+
geom_errorbar(aes(ymin = emmean - SE, ymax = emmean + SE), width=.2,
position=position_dodge(.9))+
theme_classic()+
ylim(c(0,0.4))+
labs(x = "", y = "Estimated mean")
No center effect is observed on the controls, and we assume that this conclusion may extend to the other groups. Therefore, we proceed with the rest of the analysis without considering a center effect
data2 <- data %>%
dplyr::filter(disease_grp %in% "CTRL" & modality %in% "excl CATHB")
model <- lmerTest::lmer(area ~ BRAINBANK + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## BRAINBANK 0.6122 2 0.7363
data2 <- data %>%
dplyr::filter(modality %in% "excl CATHB")
model <- lmerTest::lmer(area ~ disease_grp + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## disease_grp 10.153 5 0.07102 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emm <- emmeans::emmeans(model, pairwise ~ "disease_grp")
emm1 <- emm$emmeans
emm1 <- data.frame(emm1) %>%
dplyr::select(disease_grp, emmean, SE)
emm$contrasts
## contrast estimate SE df z.ratio p.value
## APP - CTRL -0.01881 0.01022 Inf -1.841 0.4395
## APP - DS 0.00107 0.01471 Inf 0.073 1.0000
## APP - DSD 0.00776 0.01291 Inf 0.601 0.9910
## APP - DUPAPP 0.00522 0.01235 Inf 0.423 0.9983
## APP - SAD -0.01602 0.01071 Inf -1.495 0.6672
## CTRL - DS 0.01988 0.01384 Inf 1.437 0.7045
## CTRL - DSD 0.02657 0.01190 Inf 2.232 0.2230
## CTRL - DUPAPP 0.02403 0.01129 Inf 2.129 0.2720
## CTRL - SAD 0.00279 0.00947 Inf 0.294 0.9997
## DS - DSD 0.00669 0.01593 Inf 0.420 0.9983
## DS - DUPAPP 0.00415 0.01548 Inf 0.268 0.9998
## DS - SAD -0.01710 0.01421 Inf -1.203 0.8355
## DSD - DUPAPP -0.00254 0.01377 Inf -0.184 1.0000
## DSD - SAD -0.02378 0.01233 Inf -1.929 0.3844
## DUPAPP - SAD -0.02125 0.01174 Inf -1.810 0.4592
##
## Degrees-of-freedom method: asymptotic
## P value adjustment: tukey method for comparing a family of 6 estimates
emm1 %>%
ggplot(aes(x = disease_grp, y = emmean))+
geom_bar(stat = "identity", color="black", width = 0.85, alpha = 0.75)+
geom_errorbar(aes(ymin = emmean - SE, ymax = emmean + SE), width=.2,
position=position_dodge(.9))+
theme_classic()+
ylim(c(0,0.2))+
labs(x = "", y = "Estimated mean")
No center effect is observed on the controls, and we assume that this conclusion may extend to the other groups. Therefore, we proceed with the rest of the analysis without considering a center effect
data2 <- data %>%
dplyr::filter(disease_grp %in% "CTRL" & modality %in% "minus LF")
model <- lmerTest::lmer(area ~ BRAINBANK + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## BRAINBANK 0.616 2 0.7349
data2 <- data %>%
dplyr::filter(modality %in% "minus LF")
model <- lmerTest::lmer(area ~ disease_grp + (1|brain_id) + (1|cell_id), data = data2)
Anova(model)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: area
## Chisq Df Pr(>Chisq)
## disease_grp 10.752 5 0.05653 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emm <- emmeans::emmeans(model, pairwise ~ "disease_grp")
emm1 <- emm$emmeans
emm1 <- data.frame(emm1) %>%
dplyr::select(disease_grp, emmean, SE)
emm$contrasts
## contrast estimate SE df z.ratio p.value
## APP - CTRL -0.02000 0.01019 Inf -1.962 0.3642
## APP - DS -0.00128 0.01469 Inf -0.087 1.0000
## APP - DSD 0.00762 0.01288 Inf 0.592 0.9916
## APP - DUPAPP 0.00457 0.01231 Inf 0.371 0.9991
## APP - SAD -0.01701 0.01069 Inf -1.592 0.6041
## CTRL - DS 0.01872 0.01383 Inf 1.353 0.7549
## CTRL - DSD 0.02762 0.01189 Inf 2.323 0.1847
## CTRL - DUPAPP 0.02457 0.01127 Inf 2.180 0.2471
## CTRL - SAD 0.00299 0.00947 Inf 0.316 0.9996
## DS - DSD 0.00890 0.01592 Inf 0.559 0.9936
## DS - DUPAPP 0.00585 0.01546 Inf 0.378 0.9990
## DS - SAD -0.01573 0.01420 Inf -1.108 0.8785
## DSD - DUPAPP -0.00305 0.01375 Inf -0.222 0.9999
## DSD - SAD -0.02463 0.01232 Inf -2.000 0.3423
## DUPAPP - SAD -0.02158 0.01172 Inf -1.841 0.4392
##
## Degrees-of-freedom method: asymptotic
## P value adjustment: tukey method for comparing a family of 6 estimates
emm1 %>%
ggplot(aes(x = disease_grp, y = emmean))+
geom_bar(stat = "identity", color="black", width = 0.85, alpha = 0.75)+
geom_errorbar(aes(ymin = emmean - SE, ymax = emmean + SE), width=.2,
position=position_dodge(.9))+
theme_classic()+
ylim(c(0,0.2))+
labs(x = "", y = "Estimated mean")